/**
 * 
 */
var ListItem = (function(){
	var ListItem = function(id,name){
		this.id = id;
		this.name = name;
		this.obj = null;
	},
	classes=new Array('list_item','ui-state-default','ui-corner-top'),
	list_prefix='list_item_',
	tab_prefix='task_';
	ListItem.prototype = {
		getJQuery: function(){
			if (this.obj==null)
				this.makeListItem();
			return this.obj;
		},
		makeListItem: function(){
			this.obj=$("<li/>");
			for(var cls in classes) this.obj.addClass(classes[cls]);
			this.obj.attr('id',list_prefix+this.id);
			this.obj.append($(String.format("<a href='#{1}{2}'>{3}</a>",tab_prefix, this.id, this.name)));
		}
	}
	return ListItem;
})();

var TaskItem = (function(){
	var TaskItem = function(list_id){
		
	};
	TaskItem.prototype = {
		makeTaskItem: function(){
			
		}
	}
	return TaskItem;
})();
var InputBoxDialog = (function(){
	var InputBoxDialog = function(set){
		jObj=$(div_id).dialog();
		this.init(set);
	},jObj=null,div_id='#list_item_dialog';
	InputBoxDialog.prototype = {
			init: function(set){
				for(var key in set){
					switch (key){
					case 'text':
						jObj.text(set[key]);
					case 'option':
						jObj.dialog('option',set[key]);
						break;
					}
				}
			}
	}
	return InputBoxDialog;
})();
var AddListButton = (function(){
	var AddListButton = function (id){
		jObj=$(id).button();
		jObj.bind('click',this.click);
	},jObj=null;
	AddListButton.prototype = {
		init: function(){
			jObj.button('option',{icons:{primary:'ui-icon-document'}});
		},
		click: function(){
			
		}
	}
	return AddListButton;
})();